<script setup lang="ts">
// This starter template is using Vue 3 <script setup> SFCs
// Check out https://vuejs.org/api/sfc-script-setup.html#script-setup
import request from '@/api/service'

interface Req {
  apiKey: string
  area?: string
  areaID?: string
}
interface Res {
  area: string
}
const getWords = (data: Req) => {
  return request<Req, Res>({
    url: 'https://api.uixsj.cn/hitokoto/get?type=social',
    method: 'GET',
    data,
    interceptors: {
      requestInterceptors(res) {
        console.log('接口请求拦截')

        return res
      },
      responseInterceptors(result) {
        console.log('接口响应拦截')
        return result
      },
    },
  })
}
</script>

<template>
  <div>
    <a href="https://vitejs.dev" target="_blank">
      <img src="/vite.svg" class="logo" alt="Vite logo" />
    </a>
    <a href="https://vuejs.org/" target="_blank">
      <img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
    </a>
  </div>
  <router-view></router-view>
</template>

<style lang="less" scoped>
.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: all 0.3s;
  &:hover {
    filter: drop-shadow(0 0 2em #646cffaa);
  }
}
.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}
</style>
